Finds and corrects areas of a 1-bit image containing inverse text.
→
The uncompressed image to be processed must reside in the Get Queue prior to REQ_EXEC. Typically, the image will be fully contained in the Get Queue, but that is not a requirement. The output image will be placed into the Put Queue during REQ_EXEC.
Padding pixels present at the end of each line may be modified by this operation.
This operation relies primarily on three parameters to select the areas to remove: minimum area width, minimum area height, and maximum dot size. All three criteria must be true of an area for it to be removed.
- Subcode is set to SF_SUBCODE_CORRECT_INVERSE_TEXT (18).
- u.SC18.MinimumAreaHeight is set to the height of the smallest inverse area that the opcode processes. Valid values are from 0 to 20,000, with 50 being a good default value.
- u.SC18.MinimumAreaWidth is set to the width of the smallest inverse area that the opcode processes. Valid values are from 0 to 20,000, with 300 being a good default value.
- u.SC18.MinimumBlackOnEdges is set to the smallest horizontal distance between the edges of an inverse text zone and the inverse text itself. Use a lower value if inverse zones are missed. Use a higher value if normal text is being treated as inverse. Valid values are from 0 to 100, with 10 being a good default.
- u.SC18.Density is set to the maximum number of white pixels per 100 black pixels within a given area. Valid values are from 0 to 20,000, with 200 being a good default. You should use a higher value to detect lighter zones.
- Stride is set to the image line width in bytes including padding at the end of the line width or to 0. If Stride is 0 and PF_NoDibPad is set in PicFlags, the operation will compute the stride using: [ (PixelWidth*BitCount)/8 ]. If Stride is 0 and PF_NoDibPad is not set in PicFlags, the operation will compute the stride using: [ (((PixelWidth*BitCount)+31)&(~31))/8 ].
In addition to placing an output image into the Put Queue, this operation stores some output information into the PIC_PARM structure in the following locations.
CountOfFeaturesDetected is set, during REQ_EXEC, to the number of areas removed.
OutputStride is set, during REQ_INIT and REQ_EXEC, to the image line width in bytes including padding at the end of the line.
BiOut is set, during REQ_INIT and REQ_EXEC, to the attributes of the output image. Since this operation does not adjust the size of the image, BiOut will be set to a copy of the Head structure within PIC_PARM.